<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>

<c:set var="ctx" value="${pageContext.request.contextPath}" />
<div id="recommend">
	<div id="banner" class="carousel slide hidden-phone">
		<div class="carousel-inner container" id="banner-carousel">
		</div>
		<a class="left carousel-control" href="#banner" data-slide="prev">‹</a>
		<a class="right carousel-control" href="#banner" data-slide="next">›</a>
	</div>
	
	<div class="wrap hotitem visi-hotitem">
	<div class="container container-wrap">
	
<p class="sort-row hidden-phone">
	<span class="hidden-phone">服务分类：</span>
	<span id="type-nav" style="border:0;background-color: inherit;"></span>
</p>
<div class="recommend-img-head pre_project" style="display:none">
	<div class="yushen-img"></div>
	<div class="sort"></div>
	<a href="${ctx }/project/discover?s=2" class="index-more" id="preProjectMore">更多&nbsp;&gt;&gt;</a>
</div>

<div class="row-fluid " id="pre-trial-projects" style="min-height:335px;display:none;"></div>

<div class="recommend-head">
	<span class="sort" id="itemFirstname"></span>
	<a href="${ctx }/project/discover?t=1" class="index-more"  id="mostNeedSupport">更多&nbsp;&gt;&gt;</a>
</div>

<div class="row-fluid " id="gold-projects" style="min-height:335px;">
	<div class="laoding-round"></div>
</div>
</div>



<div class="container">
<div class="recommend-head">
	<span class="sort" id="itemSecname"></span>
	<a href="${ctx }/project/discover?t=2" class="index-more" id="mostNeedAttention">更多&nbsp;&gt;&gt;</a>
</div>

<div class="row-fluid " id="latest-projects" style="min-height:335px;">
	<div class="laoding-round"></div>
</div>
</div>

<div class="container">
<div class="recommend-head">
	<span class="sort" id="itemFname"></span>
	<a href="${ctx }/project/discover?t=3" class="index-more" id="mostNeedAttention">更多&nbsp;&gt;&gt;</a>
</div>

<div class="row-fluid " id="small-projects" style="min-height:335px;">
	<div class="laoding-round"></div>
</div>

</div>
</div>
</div>


<!-- 服务分类模板   -->
<script type="text/html" id="category-template">
	
<$for(var i = 0;i<projectCategories.length;i++){$>
	<a href="${ctx }/project/discover?c=<$=projectCategories[i].id$>" key="3" data="<$=projectCategories[i].id$>" class="project_kind" id="kind<$=projectCategories[i].id$>"><$=projectCategories[i].categoryName$></a> 
	<$}$>									
	</script>
<!-- 服务收益类型模板 -->
<script type="text/html" id="profit-template">
<$for(var i= 0;i<data.length;i++){$>
	<a href="${ctx }/project/discover?s=<$=data[i].id$>" data="<$=data[i].id$>" class="profitId"><$=data[i].categoryName$></a> 
	<$}$>										
</script>

	<!-- 轮播框模板 -->
	<script type="text/html" id="carousel-template">
	<$ for (var i = 0; i < result.length; i ++) { $>
		<div class="item">
		<a class="span" style="width:78%" href="${ctx }/project/detail?id=<$=result[i].id$>&flag=true" target="_blank">
				<img src="<$= result[i].photoUrl$>/744x279/" alt="Slide <$=i$>" style="width:100%;min-height:350px;">
		</a>
		<ul class="project-one-title span" style="width:22%;margin-left:0;">
		<li class="project-title-roll" style="min-height:150px;">
		<a class="project-title-msg" href="${ctx }/project/detail?id=<$=result[i].id$>&flag=true" title="">
		<$= result[i].name$>
		</a>
		<span style="max-height:120px;display:block;overflow:hidden">
		<$= result[i].description$>
		</span>
		</li>
		<li class="project-function"><a  href="#"><i class="address"></i><$=result[i].cityRegion.name$></a></li>
		<li class="project-stats">
		<div class="project-jindu">
		<div class="projectpledged" ></div>
		</div>
		<div class="projectstats">
		<dl class="widtha">
		<dd><span id="attentioncount"><b><$= result[i].attentionCount$></b></span></dd>
		<dd>关&nbsp;&nbsp;注</dd>
		</dl>
		<dl class="widthb">
									<dd>￥<span id="fundcurrent"><b><$= result[i].fundCurrent$></b></span></dd>
									<dd>已售金额</dd> 
								</dl>
		<dl class="widthc">
		<dd style="text-align:center;"> 
		<span id="productamount"><b><$= result[i].productAmount$></b></span>
		</dd>
		<dd>已售数量</dd>
		</dl>
		<div class="clearfix"></div>
		</div>
		</li>
		</ul>
		</div>
	<$}$>
		</script>

		<script type="text/html" id="project-template">
			<$for(var i = 0;i<result.length;i++){$>
				<li class="span3 proj-brief">
				<div class="thumbnail hidden-phone">
				<a href="${ctx }/project/detail?id=<$=result[i].id$>&flag=true" title="">
					<div class="imgframe">
						<div class="img-box">
							<img data-src="holder.js/300x200" alt="300x200" src="<$=result[i].photoUrl$>" style="width:100%;height:100%">
						</div>
					</div>
				</a>
				<div class="caption">
					<ul class="project-one">
						<li class="project-title"><a href="${ctx }/project/detail?id=<$= result[i].id $>&flag=true" title=""><$= result[i].name $> </a></li>
						<li class="project-function"><a href="javascript:void(0)"><i class="address"></i><$= result[i].cityRegion.name$></a></li>
						<li class="project-stats">
							<div class="project-jindu">
								<div class="projectpledged" ></div>
							</div>
							<div class="projectstats">
								<dl class="widtha">
									<dd><span id="attentioncount"><b> <$= result[i].attentionCount$></b></span> </dd>
									<dd>关&nbsp;&nbsp;注</dd>
								</dl>
								<dl class="widthb">
									<dd>￥<span id="fundcurrent"><b><$= result[i].fundCurrent$></b></span></dd>
									<dd>已售金额</dd> 
								</dl>
								<dl class="widthc">
									<dd><span id="productamount"><b><$= result[i].productAmount$></b></span></dd>
									<dd>已售数量</dd>
								</dl>
							</div>
						</li>
					</ul>
				</div>
				</div>                  
  <div class="thumbnail visible-phone" style="margin:0px 20px 20px 20px;">
        <a href="${ctx }/project/detail?id=<$=result[i].id$>&flag=true" title="">
             <img alt="" src="<$=result[i].photoUrl$>">
        </a>
        <p style="height:70px;">
         <span class="visi-thum-name"> <$=result[i].name $></span>
        <span class="visi-address"><$= result[i].cityRegion.name$></span>
        </p>
        <table style="height:50px;background-color:#f8f8f8;width:100%;">
           <tr>
           <td style="padding-left:10px;"><b><$= result[i].attentionCount$>人</b></td>
           <td><b>￥<$= result[i].fundCurrent$></b></td>
           <td><b><$= result[i].productAmount$>件</b></td>
           </tr>
           <tr>
           <td class="visi-thum" style="padding-left:10px;">关注人数</td>
           <td class="visi-thum">已售金额</td>
           <td class="visi-thum">已售数量</span>
           </tr>
       </table>
   </div>
				</li>
			<$}$>
			</script>

<c:if test="${env == 'production' }">
<script type="text/javascript">
	seajs.use("${ctx}/assets/js-dist/project/recommend-page");
</script>
</c:if>
<c:if test="${env != 'production' }">
<script type="text/javascript">
	seajs.use("${ctx}/assets/js/project/recommend-page");
</script>
</c:if>
